#!/usr/bin/env python
def fn1(n):
    for line in range(n):
        for space in range(n-line-1):
            print(' ',end='  ')
        for num in range(line + 1, 0, -1):
            if num > 9:
                print(num,end=' ')
            else:
                print(num,end='  ')
        print()

def fn2(n):
    for line in range(n,0,-1):
        for space in range(n-line):
            print(' ',end='  ')
        for num in range(line,0,-1):
            if num > 9:
                print(num,end=' ')
            else:
                print(num,end='  ')
        print()


fn1(12)
print('-'*50)
fn2(12)


# 空格宽度没有做到统一
